package tech.anzhen.simple.rpc.support.logging;

import java.util.UUID;


public class LoggingTracer {

    private static final ThreadLocal<String> threadLocal = new ThreadLocal<String>();

    public static void start() {
        threadLocal.set(UUID.randomUUID().toString().replaceAll("-", ""));
    }

    public static void set(String tracer) {
        threadLocal.set(tracer);
    }

    public static void remove() {
        threadLocal.remove();
    }

    public static String get() {
        return threadLocal.get();
    }
}
